package cn.model;

import cn.util.Toolsutil;

import java.sql.Timestamp;

public class TBorrow {
    private int borrowid;
    private int equipid;
    private String borrowTime;
    private String userid;
    private String reasons;
    private int audit;

    public int getBorrowid() {
        return borrowid;
    }

    public void setBorrowid(int borrowid) {
        this.borrowid = borrowid;
    }

    public int getEquipid() {
        return equipid;
    }

    public void setEquipid(int equipid) {
        this.equipid = equipid;
    }

    public String getBorrowTime() {
        return Toolsutil.GetDateFormat(borrowTime);
    }

    public void setBorrowTime(String borrowTime) {
        this.borrowTime = borrowTime;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getReasons() {
        return reasons;
    }

    public void setReasons(String reasons) {
        this.reasons = reasons;
    }

    public int getAudit() {
        return audit;
    }

    public void setAudit(int audit) {
        this.audit = audit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TBorrow tBorrow = (TBorrow) o;

        if (borrowid != tBorrow.borrowid) return false;
        if (equipid != tBorrow.equipid) return false;
        if (audit != tBorrow.audit) return false;
        if (borrowTime != null ? !borrowTime.equals(tBorrow.borrowTime) : tBorrow.borrowTime != null) return false;
        if (userid != null ? !userid.equals(tBorrow.userid) : tBorrow.userid != null) return false;
        if (reasons != null ? !reasons.equals(tBorrow.reasons) : tBorrow.reasons != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = borrowid;
        result = 31 * result + equipid;
        result = 31 * result + (borrowTime != null ? borrowTime.hashCode() : 0);
        result = 31 * result + (userid != null ? userid.hashCode() : 0);
        result = 31 * result + (reasons != null ? reasons.hashCode() : 0);
        result = 31 * result + audit;
        return result;
    }
}
